<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@taglib prefix="h" uri="/syzg-html"%>

<!DOCTYPE html>
<html>
<head>
<%@ include file="/base/jsp/common/CommonListTop.jsp"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>系统管理-在线用户</title>
<link href="${ctx}/base/css/common.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/base/css/${customTheme}.css" rel="stylesheet" type="text/css" />
<script src="${ctx}/base/js/base.js" type="text/javascript"></script>
<script src="${ctx}/base/js/common/FormFunction.js" type="text/javascript"></script>
<script src="${ctx}/baseNew/plugins/jQuery/jQuery-2.2.0.min.js"></script>
<link href="${ctx}/baseNew/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<script src="${ctx}/baseNew/bootstrap/js/bootstrap.js" type="text/javascript"></script>
<script src="${ctx}/baseNew/other/js/locales/bootstrap-datetimepicker.zh-CN.js" type="text/javascript"></script>
<link rel="stylesheet" href="${ctx}/baseNew/dist/css/AdminLTE.min.css">
<script src="${ctx}/baseNew/other/js/bootbox.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="${ctx}/baseNew/validator/css/bootstrapValidator.css" />
<script type="text/javascript" src="${ctx}/baseNew/validator/js/bootstrapValidator.js"></script>
<script type="text/javascript" src="${ctx}/base/js/My97DatePicker/WdatePicker.js"></script>
<link rel="stylesheet" href="${ctx}/zenithsun/css/admin-imgList.css" />
<script>
	function offine(loginId) {
		$.ajax({
			url : "${ctx}/offline",
			type : "post",
			data : {
				"loginId" : loginId
			},
			success : function(data) {
				var msg = data.content;
				if(msg == 'NOT OFF SELF'){
					alert('不能注销自己');
				}else if(msg == 'YES'){
					alert(loginId+'已注销');
					location.reload();
				}else{
					alert(loginId+'注销失败');
				}
			}
		});
	}
</script>
</head>
<body class="rightBody">
	<div class="tableH2">在线用户</div>
	<form name="searchForm" method="post" action="" class="form-inline">
		
	</form>
	<table class="list" align="center" width="800" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<th>序号</th>
			<th>用户</th>
			<th>终端IP</th>
			<th>登陆时间</th>
			<th>操作</th>
		</tr>
		<c:forEach var="line" items="${lineList }" varStatus="vs">
			<tr>
				<td>${vs.count }</td>
				<td>${line.login }</td>
				<td>${line.ip }</td>
				<td>${line.loginDate }</td>
				<td><a href="javascript:offine('${line.login }');">注销</a></td>
			</tr>
		</c:forEach>
	</table>
</body>
</html>
